#include <iostream>
#include <cstring>
#include <queue>
#include <map>
#include <vector>
#include <string.h>
using namespace std;

int n;
int ans = 0;
int x;

int main()
{
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> x;
        ans = max(ans, x);
    }
    cout << ans << endl;
   // system("pause");
    return 0;
}